﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;

public partial class gongyingshang : System.Web.UI.Page
{
    private static string sqlconn = System.Configuration.ConfigurationManager.AppSettings["sqlcon"].ToString().Trim();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnjia_Click(object sender, EventArgs e)
    {
        string id = txtid.Text.Trim();
        string name = txtname.Text.Trim();
        string ren = txtren.Text.Trim();
        string phone = txtphone.Text.Trim();
        string address = txtaddress.Text.Trim();


        users us = new users();
        us.id = id;
        us.name = name;
        us.ren = ren;
        us.phone = phone;
        us.address = address;


        int result = us.addgong(us);
        if (result > 0)
        {
            Response.Write("<script>alert(\"添加成功！\")</script>");

        }
    }
    protected void btncin_Click(object sender, EventArgs e)
    {
        txtid.Text = null;
        txtname.Text = null;
        txtren.Text = null;
        txtphone.Text = null;
        txtaddress.Text = null;
    }
}